{% extends 'mobile/base.html' %}
{% load static from staticfiles %}

{% block mainbody %}

	<!--头部-->
	<header>
		<div class="header">
			<h1>我的订单</h1>
			<a href="{% url 'mobile_member_index' %}" class="return"><i></i></a>
		</div>
	</header>
	
	<!--内容区-->
	<article class="main-container">
		
		<!--选项卡-->
		<nav class="memberOrder-nav line"><a href="{% url 'mobile_member_orders' %}" {% if request.GET.status != '1' and request.GET.status != '3' %} class="line select" {% else %} class="line" {% endif %}>全部</a><a href="{% url 'mobile_member_orders' %}?status=1" {% if request.GET.status == '1' %} class="line select" {% else %} class="line" {% endif %}>排队中</a><a href="{% url 'mobile_member_orders' %}?status=3" {% if request.GET.status == '3' %} class="line select" {% else %} class="line" {% endif %}>已完成</a></nav>
		<div class="memberOrder-header"></div>
		
		<!--列表-->
        {% for order in orderslist %}
		<div class="memberOrder-list line" onclick="location.href='{% url 'mobile_member_detail' %}?pid={{ order.id }}'">
			<p>订单编号：{{ order.id }}<span>（{{ order.status_info }}）</span></p>
			<div class="order-product line">
				<ul>
					<li>
                        {% for vo in order.plist %}
                        <img src="{% static 'uploads/product/' %}{{ vo.product.cover_pic }}" alt="">
                        {% endfor %}
                    </li>
				</ul>
			</div>
			<p>
                <b>总价：</b><span>￥{{order.money}}</span> 元 &nbsp;&nbsp;
                <b>下单时间：</b>{{order.create_at|date:'Y-m-d H:i'}}
            </p>
		</div>
        {% endfor %}
		
	</article>

{% endblock %}